<?
$title = $_POST['title'];
$text = str_replace("\'",'&prime;',str_replace('\"','&quot;',$_POST['text']));
$anons = str_replace("\'",'&prime;',str_replace('\"','&quot;',$_POST['anons']));
$act = ($_POST['act'] == 'on')?true:false;
$_POST['date'] = date('Y-m-d',strtotime($_POST['date']));
$news = loadmodule('news');
$news= new news();
$news->update($_POST['id'],$title,$anons,$text,$_POST['date'],$act);
echo '{success: true}';
?>